<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript">
	if(self!=top){
		top.location.href='login.jsp';
	}
</script>
<title>登录页面</title>
<style type="text/css">
div{
  position:absolute;
  hight:100%;
  left:45%;
  top:50%;
}
body{
	background: url(login-background.jpg) no-repeat;
	width:100%;
	overflow-x:hidden;
}
</style>
</head>
<body>
<div>
<!-- <form action="DoLog.do" method="post" id="form"> -->
<form  method="post" id="form">
	<div class="input-group input-group-lg" >
		  <span class="input-group-addon" id="sizing-addon1">账号</span>
		  <input type="text" class="form-control" id="username" name="username" placeholder="请输入账号" aria-describedby="sizing-addon1" style="width:250px;">
	</div>
	<br>
	<div class="input-group input-group-lg">
		  <span class="input-group-addon" id="sizing-addon1">密码</span>
		  <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" aria-describedby="sizing-addon1" style="width:250px;">
	</div>
	<br>
	<br>
	<div class="btn-group btn-group-justified" role="group" aria-label="...">
  		<div class="btn-group" role="group">
    		<button type="submit" class="btn btn-default" id="bt1" style="width:250px;top:0;right:300px;">登录</button>
 		</div>
	</div>
</form>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-3.3.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript">
		document.getElementById("bt1").onclick=function(){
			var username=document.getElementById("username").value;//用户名
			var password=document.getElementById("password").value;//密码
			if(username==""){
				if(password==""){
					alert("请输入用户名和密码！");
					return false;
				}else{
					alert("请输入用户名！");
					return false;
				}
			}else if(password==""){
				alert("请输入密码！！");
				return false;
			}
			document.getElementsByTagName("form")[0].action='DoLog.do';
			document.getElementsByTagName("form")[0].submit;
			/*
			if(username=="" || password==""){
				
			}else{
				document.getElementsByTagName("form")[0].action='DoLog.do';
				document.getElementsByTagName("form")[0].submit;
				//return true;
			}
			*/
		}
</script>
</body>
</html>